package com.learn.service;

import com.learn.entity.RoleEntity;
import com.learn.framework.util.StringUtil;
import com.learn.repository.RoleRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RoleService {
    @Autowired
    private RoleRepository roleRepository;

    public List<RoleEntity> roleEntityList(String roleIdString){
        Integer[] integers  =   StringUtil.convertInteger(roleIdString.split(","));
        return roleRepository.findByIds(integers);
    }
}
